<div class="content-left content-double">
    <h1>Resources for: <?= $this->escape($this->right->name) ?></h1>
    
    <div class="frame-input">
        <table class='shaded' style="width: 100%">
            <caption>
                Resources
            </caption>
            <thead>
                <tr>
                    <th>Module</th>
                    <th>Controller</th>
                    <th>Action</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <?php foreach ($this->resources as $resource) : ?>
                <tr>
                    <td><?= $this->escape($resource->module); ?></td>
                    <td><?= $this->escape($resource->controller); ?></td>
                    <td>
                        <?php if ($resource->action == '*') :?>
                        <strong>All</strong>
                        <?php else: ?>
                        <?= $this->escape($resource->action); ?>
                        <?php endif; ?>
                    </td>
                    <td style="text-align: center;">
                        <a href="<?= $this->url(array('module' => 'user', 'controller' => 'right', 'action' => 'edit-resource', 'resource' => $resource->id), null, true); ?>">
                            Edit
                        </a>
                    </td>
                </tr>
            <?php endforeach;?>
            </tbody>
        </table>
    </div>
    
</div>

<div class="content-right content-half">
   
    <h1>Other options</h1>
    
    <div class="frame-input">
        <div class="frame-content">
            <div class="button-small">
                <a href="<?= $this->url(array('module' => 'user', 'controller' => 'right', 'action' => 'create-resource', 'right' => $this->right->id), null, true) ?>">New Resource</a>
            </div>
            <br/>
            <div class="button-small">
                <a href="<?= $this->url(array('module' => 'user', 'controller' => 'right', 'action' => 'edit', 'right' => $this->right->id), null, true) ?>">Back</a>
            </div>
        </div>
    </div>

</div>